<html>
<head><meta charset="utf-8"><title>stabilizing destructuring_assignment? · t-lang · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/index.html">t-lang</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/stabilizing.20destructuring_assignment.3F.html">stabilizing destructuring_assignment?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="235252720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/stabilizing%20destructuring_assignment%3F/near/235252720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/stabilizing.20destructuring_assignment.3F.html#235252720">(Apr 19 2021 at 21:26)</a>:</h4>
<p>aside from documentation, is there anything left prior to stabilization of destructuring_assignment? <a href="https://github.com/rust-lang/rust/issues/71126">https://github.com/rust-lang/rust/issues/71126</a></p>



<a name="235254149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/stabilizing%20destructuring_assignment%3F/near/235254149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/stabilizing.20destructuring_assignment.3F.html#235254149">(Apr 19 2021 at 21:37)</a>:</h4>
<p>I'm looking, and I don't see a stabilization report.</p>



<a name="235254948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/stabilizing%20destructuring_assignment%3F/near/235254948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/stabilizing.20destructuring_assignment.3F.html#235254948">(Apr 19 2021 at 21:45)</a>:</h4>
<p>ah, I thought that was something that happened coterminously with the fcp</p>



<a name="235266065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/stabilizing%20destructuring_assignment%3F/near/235266065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/stabilizing.20destructuring_assignment.3F.html#235266065">(Apr 19 2021 at 23:36)</a>:</h4>
<p>Normally we want the stabilization report before starting the FCP.</p>



<a name="235318711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/stabilizing%20destructuring_assignment%3F/near/235318711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/stabilizing.20destructuring_assignment.3F.html#235318711">(Apr 20 2021 at 10:10)</a>:</h4>
<p>I'm curious how this interacts with <code>let $pat = $expr else { ... }</code>. Would we want to support this with destructuring assignments as well?</p>



<a name="235324889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/stabilizing%20destructuring_assignment%3F/near/235324889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Daniel Henry-Mantilla <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/stabilizing.20destructuring_assignment.3F.html#235324889">(Apr 20 2021 at 11:09)</a>:</h4>
<p>I personally believe that the generalization to "branched" assignments would be to feature <code>in</code> patterns.<br>
Granted, it would allow writing <code>let in x = …;</code> for the same semantics as <code>x = …;</code>, but that's already the case with <code>ref</code> (<code>let ref x = …;</code> <em>vs.</em> <code>let x = &amp;…;</code>), and it would require a keyword, albeit a very intuitive one.<br>
It would, however, avoid having to write that ugly <code>Pat(binding_) =&gt; { binding = binding_; … }</code>.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>